<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>错误页面</title>
<style>
	@import url(../index/src/css/error.css);
</style>
<script language="javascript" src="../index/src/js/jquery-2.1.4.js"></script>
<script language="javascript" src="../index/src/js/anime.min.js"></script>
</head>
<body>
<div class="container">
	<font>这个页面出了点问题</font><br>
	<font>_(:3」∠)_</font>
	<br>
	<br>
	<font class="statue"></font>
</div>
<script language="javascript">
	var time = {obj:0};
	var stat = document.querySelector(".statue");
	var stn = "404";
	var stl = "Not Found";
	function rS(len) {
		len = len || 1;
		var $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
		var maxPos = $chars.length;
		var pwd = '';
		for (i = 0; i < len; i++) {
			pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
		}
		return pwd;
	}
	function rN(len) {
		len = len || 1;
		var $chars = '0123456789';
		var maxPos = $chars.length;
		var pwd = '';
		for (i = 0; i < len; i++) {
			pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
		}
		return pwd;
	}
	function rndi(){
		var pha = time["obj"];
		var to = 49;
		var l1 = stn.length;
		var l2 = stl.length;
		var pd = pha/to;
		l1 = Math.round(pd < 1 ? pd * l1 : l1);
		l2 = Math.round(pd < 1 ? pd * l2 : l2);
		var text = pha == 50 ? stn+" "+stl : rN(l1)+" "+rS(l2);
		console.log(text);
		console.log(pha);
		$(".statue").html(text);
	}
	var ani = anime({
		targets: time,
		obj: 50,
		easing:"easeOutQuint",
		round: 1,
		update: function(anim){
			rndi();
		}
	});
	$(document).ready(ani.play());
</script>
</body>
</html>
